#include <omp.h>
int main()
{
     int nthreads, myid;
     	/* make the values of nthreads and myid private to each thread */
	#pragma omp parallel private (nthreads, myid)
	{
		myid = omp_get_thread_num();
          	printf("Hello I am thread %d\n", myid);
         	/* only master node print the number of threads */
          	if (myid == 0)
        	{
              	nthreads = omp_get_num_threads();
              	printf("Number of threads = %d\n", nthreads);
         	}
   	}
	return 0;

} 
